<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>求和</title>
    <script type="text/javascript">
    var sum = 0;
    for(var i = 1;i <= 100; i++)
    {
		sum += i;
    }
	document.write("1至100的和是:" + sum);
    </script>
</head>
<body>
    
</body>
</html>